package com.xiaoyu.tool.repository.user;

import com.xiaoyu.tool.entity.User.UserRelationship;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 * Created by wenqin on 2017/5/19.
 */
@Repository
public interface UserRelationshipRepository extends JpaRepository<UserRelationship,Long> {

    UserRelationship findByChildOpenId(String openId);

    UserRelationship findByChildUserId(Long userId);

    UserRelationship findByChildUserIdAndParentId(Long childId, Long parentId);

}
